'use strict';
var Schema = require('mongoose').Schema,
    Model = require('../../../Base/server/controllers/Model');

var modelField = {};

//入库明细行记录
modelField.RcvRecord={
    type: Schema.ObjectId,
    ref: 'RcvRecord',
    Name: '入库头',
    IsEmpty: false
}

//Lot，批号编码
modelField.LotCode = {
    type: String,
    trim: true
};

//番号
modelField.SeiBanCode = {
    type: String,
    trim: true
};
//存储地点
modelField.WhCode = {
    type: String,
    trim: true
};
//库位
modelField.BinCode = {
    type: String,
    trim: true
};
//数量
modelField.Qty={
    type: Number
};

modelField.ItemCode={
    type: String,
    trim: true
}

var newModel = new Model(modelField);
newModel.addIndex({RcvRecord: 1, Work: 1});
newModel.create('RcvRecordDetial', '入库记录明细');
